//package com.itdfq.consumer.consumer;
//
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Component;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//
///**
// * @Author: QianMo
// * @Date: 2021/11/16 9:19
// * @Description:
// */
//@Component
//@RabbitListener(queues = "queue_name")
//public class ReceiverDemo1 {
//    @RabbitHandler
//    public void process(String message) {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        System.out.println("接收消息: " + message + " 接收时间：" + sdf.format(new Date()));
//        throw new RuntimeException("测试异常处理");
//    }
//}
